package gfyx_crm_relation

import "time"

// CREATE TABLE `gfyx_crm_relation` (
//  `uid` char(36) NOT NULL COMMENT '主键，uuid',
//  `business_uid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '当business_type为0时，对应gfyx_report表的uid；当business_type为1时，对应clue表的ClueGUID；',
//  `business_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '对应业务类型，0-报备，对应gfyx_report表; 1-线索，对应clue表',
//  `crm_uid` varchar(255) NOT NULL DEFAULT '' COMMENT "第三方crm系统的线索唯一ID",
//  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT "记录创建时间",
//  `created_by` varchar(40) NOT NULL DEFAULT '' COMMENT "记录创建人",
//  `modified_on` datetime NOT NULL COMMENT "记录更新时间",
//  `modified_by` varchar(40) NOT NULL DEFAULT '' COMMENT "记录更新人",
//  `is_deleted` tinyint(1) NOT NULL DEFAULT '0'  COMMENT "软删除字段，0-正常记录，1-已删除",
//  PRIMARY KEY (`uid`)
//) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='gfyx_report表和第三方crm系统的关联表';

type GfyxCrmRelationPo struct {
	Uid          string `gorm:"primary_key"`
	BusinessUid  string
	BusinessType int32
	CrmUid       string
	CreatedOn    time.Time
	CreatedBy    string
	ModifiedOn   time.Time
	ModifiedBy   string
	IsDeleted    int32
}

func (po GfyxCrmRelationPo) TableName() string {
	return "gfyx_crm_relation"
}
